﻿using BJoin.Application.Dto;
using BJoin.DemoProject.ExtObject;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace BJoin.DemoProject.Dtos
{
    public partial class FileDto: ResDto<long,FileExtObject>
    {
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// Descript: 名称
        /// DbType: varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Name { get; set; }

        public FileFormatEnum FileFormat { get; set; } = 0;
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public long[] TagIds { get; set; }

        /// <summary>
        /// Descript: 创建人
        /// DbType: varchar(20)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Crb { get; set; }

        /// <summary>
        /// Descript: 创建时间
        /// DbType: timestamp(6)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public DateTimeOffset Crt { get; set; }

        /// <summary>
        /// Descript: 更新人
        /// DbType: _varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Upb { get; set; }

        /// <summary>
        /// Descript: 备注
        /// DbType: text
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// Descript: 更新时间
        /// DbType: _time(6)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public DateTimeOffset Upt { get; set; }
    }
    public partial class FileAddDto:ReqAddDto<FileExtObject>
    {
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// Descript: 名称
        /// DbType: varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public long?[] TagIds { get; set; }

        /// <summary>
        /// Descript: 创建人
        /// DbType: varchar(20)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Crb { get; set; }

        /// <summary>
        /// Descript: 更新人
        /// DbType: _varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Upb { get; set; }

        /// <summary>
        /// Descript: 备注
        /// DbType: text
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Remark { get; set; }
    }
    public partial class FileUpdateDto:ReqUpdateDto<FileExtObject>
    {
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// Descript: 名称
        /// DbType: varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public long?[] TagIds { get; set; }

        /// <summary>
        /// Descript: 更新人
        /// DbType: _varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Upb { get; set; }

        /// <summary>
        /// Descript: 备注
        /// DbType: text
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Remark { get; set; }
    }
    public partial class FileFilterDto: ReqFilterDto<FileExtObject>
    {
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public string[] Code { get; set; }

        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public long?[] TagIds { get; set; }

        /// <summary>
        /// Descript: 名称
        /// DbType: varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Name { get; set; }
        [NotMapped]
        public FileFormatEnum? FileFormat { get; set; } = FileFormatEnum.Pdf;
        /// <summary>
        /// Descript: 创建人
        /// DbType: varchar(20)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Crb { get; set; }

        /// <summary>
        /// Descript: 更新人
        /// DbType: _varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Upb { get; set; }

        /// <summary>
        /// Descript: 备注
        /// DbType: text
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Remark { get; set; }
    }
    public partial class FileFilterDefaultOrderDto : ReqFilterOrderbyIdDescDto<FileExtObject>
    {
        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public string[] Code { get; set; }

        /// <summary>
        /// Descript: 编码
        /// DbType: varchar(50)
        /// AllowNull: NO
        /// Defaultval: 
        /// </summary>
        public long?[] TagIds { get; set; }

        /// <summary>
        /// Descript: 名称
        /// DbType: varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Name { get; set; }
        [NotMapped]
        public FileFormatEnum? FileFormat { get; set; } = FileFormatEnum.Pdf;
        /// <summary>
        /// Descript: 创建人
        /// DbType: varchar(20)
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Crb { get; set; }

        /// <summary>
        /// Descript: 更新人
        /// DbType: _varchar
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Upb { get; set; }

        /// <summary>
        /// Descript: 备注
        /// DbType: text
        /// AllowNull: YES
        /// Defaultval: 
        /// </summary>
        public string Remark { get; set; }
    }
}
